Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Reproduce paintEvent failures #7294

Merged
merged 2 commits into from
Mar 17, 2020

Conversation

GuillaumeFavelier
Copy link
Contributor

@GuillaumeFavelier GuillaumeFavelier commented Feb 6, 2020

The goal is to fix the Azure failures encountered recently during testing in: #7290, #7235

The log is very scarce, I'm trying locally with virtualbox at the same time:

mne\viz\_3d.py s                                                         [ 91%]
mne\viz\circle.py s                                                      [ 91%]
mne\viz\misc.py .                                                        [ 91%]
mne\viz\utils.py s                                                       [ 91%]
mne\viz\_brain\tests\test_brain.py ......ssssssss.                       [ 92%]
mne\viz\backends\tests\test_renderer.py .sx..ss                          [ 92%]
mne\viz\backends\tests\test_utils.py ..                                  [ 93%]
Windows fatal exception: access violation

Thread 0x00000ca8 (most recent call first):
  File "d:\a\1\s\conda\lib\threading.py", line 296 in wait
  File "d:\a\1\s\conda\lib\queue.py", line 170 in get
  File "D:\a\1\s\mne\gui\_coreg_gui.py", line 1363 in worker
  File "d:\a\1\s\conda\lib\threading.py", line 870 in run
  File "d:\a\1\s\condaWindows fatal exception: \access violationl

ib\threading.py", line 926 in _bootstrap_inner
##[error]Cmd.exe exited with code '-1073741819'.

@GuillaumeFavelier GuillaumeFavelier self-assigned this Feb 6, 2020
@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #7294 into master will increase coverage by 2.46%.
The diff coverage is 91.17%.

@@            Coverage Diff             @@
##           master    #7294      +/-   ##
==========================================
+ Coverage   87.60%   90.07%   +2.46%     
==========================================
  Files         454      454              
  Lines       82558    82391     -167     
  Branches    13050    13023      -27     
==========================================
+ Hits        72329    74216    +1887     
+ Misses       7426     5352    -2074     
- Partials     2803     2823      +20     

@GuillaumeFavelier
Copy link
Contributor Author

Closing now since this seems to be solved by #7295

@GuillaumeFavelier
Copy link
Contributor Author

The failures still occur.

Reference:
#7342 (comment)

@larsoner
Copy link
Member

@GuillaumeFavelier
Copy link
Contributor Author

GuillaumeFavelier commented Feb 23, 2020

I was able to read it when you did the comment but I forgot to save the log, now the build is not available anymore. I remember it was related somehow to QVTKRenderWindowInteractor and PaintEvent.

@larsoner
Copy link
Member

Just go through the recent Azure builds, it usually only takes looking at a few to find a failure with a good traceback, like:

https://dev.azure.com/mne-tools/mne-python/_build/results?buildId=5634&view=logs&j=b195a6e3-7484-5943-e627-0b35c27605d6&t=6dcb3581-08d4-5e76-74f2-6edaf20ff912&l=257

@GuillaumeFavelier
Copy link
Contributor Author

For reference, here is a log:

mne\utils\tests\test_testing.py ....                                     [ 91%]
mne\viz\_3d.py s                                                         [ 91%]
mne\viz\circle.py s                                                      [ 91%]
mne\viz\misc.py .                                                        [ 91%]
mne\viz\utils.py s                                                       [ 92%]
mne\viz\_brain\tests\test_brain.py ..............                        [ 92%]
mne\viz\backends\tests\test_renderer.py ..x....                          [ 93%]
mne\viz\backends\tests\test_utils.py ..                                  [ 93%]
Windows fatal exception: access violation

Thread 0x00001198 (most recent call first):
  File "d:\a\1\s\conda\lib\site-packages\tvtk\pyface\ui\qt4\QVTKRenderWindowInteractor.py", line 370 in paintEvent
  File "d:\a\1\s\conda\lib\site-packages\tvtk\pyface\ui\qt4\scene.py", line 69 in paintEvent
  File "d:\a\1\s\conda\lib\site-packages\pyface\ui\qt4\gui.py", line 85 in process_events
  File "d:\a\1\s\conda\lib\site-packages\surfer\viz.py", line 183 in _force_render
  File "d:\a\1\s\conda\lib\site-packages\surfer\viz.py", line 550 in _toggle_render
  File "d:\a\1\s\conda\lib\site-packages\surfer\viz.py", line 487 in __init__
  File "D:\a\1\s\mne\viz\_3d.py", line 2385 in plot_vector_source_estimates
  File "D:\a\1\s\mne\utils\_logging.py", line 89 in wrapper
  File "<D:\a\1\s\mne\externals\decorator.py:decorator-gen-131>", line 2 in plot_vector_source_estimates
  File "D:\a\1\s\mne\source_estimate.py", line 2197 in plot
  File "D:\a\1\s\mne\viz\tests\test_3d.py", line 651 in test_plot_vector_source_estimates
  File "D:\a\1\s\mne\utils\_testing.py", line 259 in dec
  File "d:\a\1\s\conda\lib\site-packages\_pytest\python.py", line 167 in pytest_pyfunc_call
  File "d:\a\1\s\conda\lib\site-packages\pluggy\callers.py", line 187 in _multicall
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 87 in <lambda>
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 93 in _hookexec
  File "d:\a\1\s\conda\lib\site-packages\pluggy\hooks.py", line 286 in __call__
  File "d:\a\1\s\conda\lib\site-packages\_pytest\python.py", line 1445 in runtest
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 134 in pytest_runtest_call
  File "d:\a\1\s\conda\lib\site-packages\pluggy\callers.py", line 187 in _multicall
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 87 in <lambda>
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 93 in _hookexec
  File "d:\a\1\s\conda\lib\site-packages\pluggy\hooks.py", line 286 in __call__
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 210 in <lambda>
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 237 in from_call
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 210 in call_runtest_hook
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 185 in call_and_report
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 99 in runtestprotocol
  File "d:\a\1\s\conda\lib\site-packages\_pytest\runner.py", line 84 in pytest_runtest_protocol
  File "d:\a\1\s\conda\lib\site-packages\pluggy\callers.py", line 187 in _multicall
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 87 in <lambda>
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 93 in _hookexec
  File "d:\a\1\s\conda\lib\site-packages\pluggy\hooks.py", line 286 in __call__
  File "d:\a\1\s\conda\lib\site-packages\_pytest\main.py", line 271 in pytest_runtestloop
  File "d:\a\1\s\conda\lib\site-packages\pluggy\callers.py", line 187 in _multicall
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 87 in <lambda>
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 93 in _hookexec
  File "d:\a\1\s\conda\lib\site-packages\pluggy\hooks.py", line 286 in __call__
  File "d:\a\1\s\conda\lib\site-packages\_pytest\main.py", line 247 in _main
  File "d:\a\1\s\conda\lib\site-packages\_pytest\main.py", line 197 in wrap_session
  File "d:\a\1\s\conda\lib\site-packages\_pytest\main.py", line 240 in pytest_cmdline_main
  File "d:\a\1\s\conda\lib\site-packages\pluggy\callers.py", line 187 in _multicall
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 87 in <lambda>
  File "d:\a\1\s\conda\lib\site-packages\pluggy\manager.py", line 93 in _hookexec
  File "d:\a\1\s\conda\lib\site-packages\pluggy\hooks.py", line 286 in __call__
  File "d:\a\1\s\conda\lib\site-packages\_pytest\config\__init__.py", line 93 in main
  File "d:\a\1\s\conda\Scripts\pytest-script.py", line 10 in <module>

@larsoner
Copy link
Member

@GuillaumeFavelier GuillaumeFavelier changed the title TST: Reproduce failures in Azure TST: Reproduce paintEvent failures Mar 12, 2020
@GuillaumeFavelier
Copy link
Contributor Author

GuillaumeFavelier commented Mar 12, 2020

The latest commit 499f917 on #7380 seems to reproduce this behaviour on Travis consistently. I restarted the failed job 3 times.

@GuillaumeFavelier
Copy link
Contributor Author

Reproduced in here, it appears to be consistent.

@GuillaumeFavelier
Copy link
Contributor Author

My first idea is to use the renderer fixture in test_mixed_sources_plot_surface

@GuillaumeFavelier
Copy link
Contributor Author

GuillaumeFavelier commented Mar 12, 2020

Test 1) is green
Test 2) is green
Test 3) is green
Test 4) is green
Test 5) failed because of #7437, will be restarted once this is fixed is green
Test 6) is green
Test 7) is green
Test 8) is green
Test 9) is green
Test 10) is green

@GuillaumeFavelier
Copy link
Contributor Author

I ported 532aba9 in #7380

@GuillaumeFavelier
Copy link
Contributor Author

Travis jobs are up in here, waiting for the good news 🤞

@agramfort agramfort marked this pull request as ready for review March 17, 2020 13:21
@agramfort agramfort merged commit 95ad0ee into mne-tools:master Mar 17, 2020
@agramfort
Copy link
Member

thx @GuillaumeFavelier !

1 similar comment
@agramfort
Copy link
Member

thx @GuillaumeFavelier !

times, array, self.interp_kind, axis=1,
assume_sorted=True)(time_idx)
ifunc = interp1d(times, self._data['time'])
act_time = ifunc(time_idx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR undid (again) some of the refactoring. The way my commits worked:

  1. the interpolators were set up once and reused (efficiency)
  2. a helper _safe_interp1d (avoids bugs now back in master)

And this commit appears to have un-done these. Accordingly we have lost the efficiency and the singleton regression is back in master:

https://circleci.com/gh/mne-tools/mne-python/18710?utm_campaign=workflow-failed&utm_medium=email&utm_source=notification

I think the real (only) bug that probably needed to be fixed here had to do with calling the interpolation functions incorrectly, right? If so @GuillaumeFavelier can you make a revert commit for this PR and try making the minimal changes required to get CIs happy again? I'd rather not sacrifice the _safe_interp1d and funcs efficiency gains...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh it's even more extensive -- I see this started out by completely reverting #7257. Are we planning on putting that back in somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated #7162 and delayed thoses features to 0.21 for now

@GuillaumeFavelier GuillaumeFavelier deleted the test_azure branch June 11, 2020 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants